const re1 = /abc/ig;
const message = "fdabc21 faBc323 dfABC12 AaaBc32";
const result = message.match(re1)
console.log(result);  
//规则上加个g表示全局
//[ 'abc', 'aBc', 'ABC', 'aBc' ]

//mathcAll传入的正则修饰符必须加g
const result2=message.matchAll(re1)
console.log(result2)  //Object [RegExp String Iterator] {}
console.log(result2.next())
console.log(result2.next())